<?php include 'function.php';?>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Demo</title>
        <link href="style.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <div class="wrapper">
            <?php
            // put your code here
            $sql='select * from students';
            $students=query($sql);
            //var_dump($students);
            ?>
            <div class="title">DATABASE</div>
            <table>
                <tr>
                    <th>ID</th>
                    <th>NAME</th>

                </tr>
                <?php foreach ($students as $student):?>
                <tr>
                    <td><?php echo $student['id']?></td>
                    <td><?php echo $student['name']?></td>
                </tr>
                <?php endforeach;?>
            </table>
        <form id="form1" name="form1" method="post" action="insert.php">
            <input type="text" name="basic_name1" id="textfield" />
            <input type="text" name="basic_name2" id="textfield" />
            <input type="submit" name="button" id="button" value="Insert" />
        </form>
        </div>
    </body>

</html>
